Decrator for paddle.ones to support *size usage#74494
Merged
zhwesky2010 merged 2 commits intoPaddlePaddle:developfrom Aug 11, 2025
Merged
Decrator for paddle.ones to support *size usage#74494zhwesky2010 merged 2 commits intoPaddlePaddle:developfrom
zhwesky2010 merged 2 commits intoPaddlePaddle:developfrom
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
66c73c3 to
7037807
Compare
7037807 to
17ed6de
Compare
17ed6de to
1514449
Compare
zhangbo9674
previously approved these changes
Aug 8, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #74494 +/- ##
===========================================
Coverage ? 100.00%
===========================================
Files ? 2
Lines ? 16
Branches ? 0
===========================================
Hits ? 16
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
zhangbo9674
approved these changes
Aug 11, 2025
Enigmatisms
pushed a commit
to Enigmatisms/Paddle
that referenced
this pull request
Aug 11, 2025
Enigmatisms
pushed a commit
to Enigmatisms/Paddle
that referenced
this pull request
Aug 11, 2025
maxiaolong001
pushed a commit
to maxiaolong001/Paddle
that referenced
this pull request
Aug 12, 2025
Enigmatisms
pushed a commit
to Enigmatisms/Paddle
that referenced
this pull request
Aug 14, 2025
Enigmatisms
pushed a commit
to Enigmatisms/Paddle
that referenced
this pull request
Aug 19, 2025
Enigmatisms
pushed a commit
to Enigmatisms/Paddle
that referenced
this pull request
Aug 20, 2025
Enigmatisms
pushed a commit
to Enigmatisms/Paddle
that referenced
this pull request
Aug 21, 2025
zhangbo9674
pushed a commit
that referenced
this pull request
Aug 25, 2025
…th_index) (#74547) * [API-Compat] paddle.compat.split is added and tested * [API-Compat] paddle.compat.split is rigorously tested * [API-Compat] Make the forbid_keywords decorator transparent * [API-Compat] Fixed decorator str input * [API-Compat] More unittest & static graph check & updated decorator * [API-Compat] Add paddle.compat.min/max and new PHI kernel (min/max_with_index) * [API-Compat] Add compat.min/max EN doc Attempting to fix integral type gradient computation (rejection) * [WIP][API-Compat] Add dyna-graph unittests for min/max * [WIP][API-Compat] Fixed CPU failure * [API-Compat] Correct min/max_with index gradient behavior * [API-Compat] XPU fix (attempt) * [API-Compat] Updated ForbidKeywordsDecorator * some create api support more usage (#74494) * [API-Compat] Static Graph and CPU end debug * [API-Compat] Resolved conflicts in decorator_utils.py * [API-Compat] Added static graph min/max_with_index op check, simplified implementation * [API-Compat] min/max static graph op test and out tensor support * [API-Compat] Resolved merge conflicts. * [API-Compat] Fixed CPU static graph bugs removed split API for independence. * [API-Compat] Resolved merged conflicts, add symbolic shape test. * [API-Compat] Updated unittests * [API-Compat] Update version year * [API-Compat] Fixed min/max out mechanism * [API-Compat] Try adding even more unittests. --------- Co-authored-by: zhwesky2010 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
User Experience
PR Types
Improvements
Description
Pcard-73362
新增了 可变参数*size 用法适配的装饰器,适用于
paddle.ones/emtpy/zeros/...等创建类API,以下用法全部适用:装饰器编写方式
继承装饰器基类
DecoratorBase,根据该API的自身逻辑,灵活处理args、kwargs,注意装饰器逻辑必须是兼容升级的,即既要兼容Pytorch的新增用法,也要保留原Paddle的用法。